<%@page  import="merlin.beans.*,merlin.dao.*,merlin.managers.*,merlin.servlets.*,merlin.utils.*" %>

<%!
	// User types
	static final Integer USER_TYPE_MERLIN_RESEARCHER = new Integer(1);
	static final Integer USER_TYPE_FREE_UPDATES = new Integer(2);

%>

<%
	// sanity check
	if(session.getAttribute("username") == null){
		response.sendRedirect("login.jsp");
		return;
	}

	Integer iObj = (Integer)session.getAttribute("userType");
%>

<HTML>
	<HEAD>
	    <TITLE>Merlin</TITLE>
		<meta HTTP-EQUIV="Cache-Control"  CONTENT="no-cache" />
		<meta HTTP-EQUIV="Expires"        CONTENT="1 Jan 1980" />
		<meta HTTP-EQUIV="MaxAge"         CONTENT="0" />
		<meta HTTP-EQUIV="Pragma-Control" CONTENT="no-cache" />
	</HEAD>

	<frameset rows="0%,100%">
		<frame src="mr_searchdetails.jsp" name="frameSearch" scrolling="no" noresize frameborder="1"/>
		<%
		if(USER_TYPE_MERLIN_RESEARCHER.equals(iObj)){
		%>
		<frame src="mr_mainResearchers.jsp" name="frameMain" frameborder="1"/>
		<%
		}else{
		%>
		<frame src="mr_main.jsp" name="frameMain" frameborder="1"/>
		<%
		}
		%>
	<frameset>
</HTML>